package com.qk.common.exception;

import com.qk.common.enums.Code;

/**
 * @author kaoM1Jy
 * @date 2025/10/10 16:36
 * @description: 通用异常
 */
public class CommonException extends BaseException {
    public CommonException(Code code) {
        super(code.getMsg());
    }

    /**
     * 抛出通用异常
     * @param code 枚举
     */
    public static void throwCommonException(Code code) {
        throw new CommonException(code);
    }
}
